<template>
  <div class="register">
    <el-card>
      <div class="theme">医疗注册入口</div>
      <el-form
        :model="form"
        ref="form"
        size="medium"
        :rules="rules"
        label-position="left"
        label-width="80px"
      >
        <el-form-item label="类型" prop="type">
          <el-radio-group v-model="form.type">
            <el-radio label="user">用户</el-radio>
            <el-radio label="doctor">医生</el-radio>
          </el-radio-group>
        </el-form-item>
        <el-form-item label="账号" prop="username">
          <el-input v-model="form.username" prefix-icon="el-icon-user" />
        </el-form-item>
        <el-form-item label="密码" prop="password">
          <el-input
            v-model="form.password"
            type="password"
            show-password
            prefix-icon="el-icon-lock"
          />
        </el-form-item>
        <el-form-item label="确认密码" prop="checkPassword">
          <el-input
            v-model="form.checkPassword"
            type="password"
            show-password
            prefix-icon="el-icon-lock"
          />
        </el-form-item>
        <el-form-item>
          <el-button type="primary" style="width: 100%" @click="submit"
            >注册</el-button
          >
        </el-form-item>
      </el-form>
    </el-card>
  </div>
</template>

<script lang="ts" src="./register.ts" />

<style lang="less" scoped>
.register {
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #dbe9f6;
}

.el-form {
  width: 350px;
}

.el-radio-group {
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: 30px;
}

.theme {
  text-align: center;
  font-size: 30px;
  font-weight: bolder;
  height: 100px;
  line-height: 100px;
}
</style>

<style lang="less">
.el-form-item__label {
  text-align: justify;
  text-align-last: justify;
}
</style>
